WEBVTT

00:00.270 --> 00:04.560
In the last video we created a price chart with the Levin sector indexes.

00:04.740 --> 00:10.480
And from that chart we could say that the customer services index here in red.

00:10.500 --> 00:17.220
So the highest return however is pretty impossible to compare these indexes here based on risk return

00:17.220 --> 00:24.330
performance and therefore in a first step we are going to calculate the annualized risk and return based

00:24.330 --> 00:26.320
on daily simple returns.

00:26.580 --> 00:29.220
And then we create an appropriate plot.

00:29.220 --> 00:36.540
And finally we also calculate the sharp ratio and we compare Mary's portfolio with the other indexes

00:36.810 --> 00:40.850
in terms of Sharpe ratio and we we're still important here.

00:40.860 --> 00:49.210
The indexes data frame and with the percentage change method we can simply calculate a simple daily

00:49.210 --> 00:52.070
returns and we save for those returns.

00:52.090 --> 00:54.040
And the variable returns

00:57.020 --> 01:03.710
and from the video lectures we also copy to the user defined function annualized the risk and return

01:04.020 --> 01:07.490
we have we simply have to pass a returns data frame.

01:07.640 --> 01:13.760
So let's define the function here and let's pass our returns that frame and be safe.

01:13.760 --> 01:16.970
The resulting summary data frame and the variable summary

01:19.400 --> 01:26.480
so here we have the annualized the risk and return for the eleven industries for the most recent four

01:26.480 --> 01:27.860
year period.

01:28.160 --> 01:32.630
And still the performance of our health care index is pretty impressive.

01:32.630 --> 01:38.100
So on average we had a annual return of 14 percent.

01:38.270 --> 01:45.620
And finally we can also plot our 11 industries as scatter plot where we f on the x axis the total risk

01:45.620 --> 01:49.520
here and on the y axis the annualized return.

01:50.000 --> 01:59.480
So we you see the plot method and we select a scatter plot and we pass uh the risk column to the experimenter

01:59.510 --> 02:02.980
and the return column to the right parameter.

02:02.990 --> 02:11.630
And we also annotate the points for the thoughts that we create with the respect the label here.

02:11.960 --> 02:18.910
So capital goods or energy finance and let's simply run here the cell.

02:19.100 --> 02:22.610
So that's the total risk return plot.

02:22.700 --> 02:25.220
And here we have actually our health care index.

02:25.220 --> 02:31.160
And it's pretty good actually because it is desire to have low risk and high return.

02:31.490 --> 02:40.340
So it's a desire to be here on the upper left corner and the health care index is pretty much here.

02:40.340 --> 02:47.000
So compared to other industries like basic industries transportation finance or energy.

02:47.000 --> 02:54.470
And to be on the safe side and to be even more exact we have to calculate the shop ratio and the father

02:54.470 --> 03:02.360
shop ratio we need the risk free return of the risk free asset and for the period from 214 to till 80

03:02.360 --> 03:09.390
in the coupon for a four year U.S. government bond was approximately one point three percent.

03:09.530 --> 03:19.550
So we say here a list with the risk free return and the risk free risk and the RAB risk free and with

03:19.670 --> 03:26.870
this we can finally calculate the sharp ratio for our eleven indexes and we are creating the new column

03:26.870 --> 03:35.120
sharp and we can actually calculate the sharp ratio by taking the returns off our indexes minus the

03:35.120 --> 03:41.930
risk free return and then divide by the risk of the respective indexes.

03:41.930 --> 03:48.600
So with this we created the new column sharp and we can also sort our rows by the shop raised through

03:48.600 --> 03:52.150
all by the column sharp in a descending order.

03:52.180 --> 04:00.700
So starting from the industry or the index with the highest chop ratio so let's have a look here and

04:00.700 --> 04:07.540
obviously so healthcare is on the second position with the second highest chop ratio here 0 point 8

04:07.530 --> 04:08.380
7 8.

04:08.470 --> 04:12.910
And that's actually only one index or one sector with a higher shop ratio.

04:12.910 --> 04:16.300
And this is the consumer services sector.

04:16.870 --> 04:21.390
And here we have actually a sharp ratio of one point to 7 1.

04:21.430 --> 04:30.060
And finally here at the bottom we have the energy sector with a sharp ratio of only 0 point 1 5 8 so

04:30.060 --> 04:36.630
the health care sector and the marriage portfolio performed uh pretty good on a standalone basis in

04:36.810 --> 04:39.040
the recent past.

04:39.060 --> 04:41.250
So in the last four years.

04:41.310 --> 04:47.100
But the question is whether Mary could have improved the sharp ratio of her portfolio by adding other

04:47.100 --> 04:48.270
sectors.

04:48.330 --> 04:50.870
So that's the question for us step 6.

04:50.880 --> 04:52.650
And I hope to see also there by.
